package cn.edu.sgu.www.mhxysy.service.server.impl;

import cn.edu.sgu.www.mhxysy.entity.server.Area;
import cn.edu.sgu.www.mhxysy.redis.repository.impl.AreaRepository;
import cn.edu.sgu.www.mhxysy.service.server.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Service
public class AreaServiceImpl implements AreaService {

	private final AreaRepository areaRepository;

	@Autowired
	public AreaServiceImpl(AreaRepository areaRepository) {
		this.areaRepository = areaRepository;
	}

	@Override
	public List<Area> selectAll() {
		return areaRepository.selectList();
	}

	@Override
	public Area selectById(Integer id) {
		return areaRepository.selectById(id.toString());
	}

}